using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player_MoveState : PlayerStateInGround
{
    public Player_MoveState(Player player, StateMachine stateMachine, string animName) : base(player, stateMachine, animName)
    { 

    }
    public override void Enter()
    {
        base.Enter();
    }
    public override void Update()
    {
        base.Update();
        if (player.moveInput.x == 0||player.IsWall)
        {
            stateMachine.ChangeState(player.idleState);
        }
        player.SetVelocity(player.moveInput.x * player.GetMoveSpeed(), rb.velocity.y);
    }
    public override void Exit()
    {
        base.Exit();
    }
}
